dim ws : set ws = CreateObject("WScript.Shell")
dim varName : varName = "ApplicationMode"
dim regPath : regPath ="HKEY_CURRENT_USER\Software\MyApp\PADS\" & varName
dim varValue : varValue = ws.RegRead(regPath)

select case varValue
	case 0
		ws.RegWrite "HKEY_CURRENT_USER\Software\MyApp\PADS\" & varName, 1, "REG_EXPAND_SZ"
		Application.StatusBarText ="route mode"
		Application.ExecuteCommand("Filter")
		SelectionFilterDlg.Nothing.Click()
		SelectionFilterDlg.SelectionObjectsDlg.Vias = true
		SelectionFilterDlg.SelectionObjectsDlg.StitchingVias = true
		SelectionFilterDlg.SelectionObjectsDlg.Traces = true
		SelectionFilterDlg.SelectionObjectsDlg.Pins = true
		SelectionFilterDlg.SelectionObjectsDlg.TraceCorners = true
		SelectionFilterDlg.SelectionObjectsDlg.Shapes = true
		SelectionFilterDlg.Ok.Click()		
	case 1
		ws.RegWrite "HKEY_CURRENT_USER\Software\MyApp\PADS\" & varName, 0, "REG_EXPAND_SZ"
		Application.StatusBarText ="placement mode"
		Application.ExecuteCommand("Quick Filter Components")
end select
set ws = nothing


